// 身体指标记录类型定义
export interface BodyRecord {
  id?: number
  user_id?: number
  record_date: string
  height: number
  weight: number
  bmi?: number  // 将bmi改为可选字段
  low_pressure: number
  high_pressure: number
  blood_sugar: number
  heart_rate: number
  created_at?: string
}

export interface BodyRecordForm {
  id?: number
  user_id?: number
  record_date: string
  height: number
  weight: number
  bmi?: number  // 将bmi改为可选字段
  low_pressure: number
  high_pressure: number
  blood_sugar: number
  heart_rate: number
}

// 饮食记录类型定义
export interface EatingRecord {
  id?: number
  user_id?: number
  record_date: string
  foods_name: string
  intake: number
  calorie: number
  created_at?: string
}

export interface EatingRecordForm {
  id?: number
  user_id?: number
  record_date: string
  foods_name: string
  intake: number
  calorie: number
}

// 睡眠记录类型定义
export interface SleepRecord {
  id?: number
  user_id?: number
  record_date: string
  sleep_time: string
  wakeup_time: string
  sleep_duration?: number
  sleep_quality: string
  created_at?: string
}

export interface SleepRecordForm {
  id?: number
  user_id?: number
  record_date: string
  sleep_time: string
  wakeup_time: string
  sleep_duration?: number
  sleep_quality: string
}

// 运动记录类型定义
export interface SportsRecord {
  id?: number
  user_id?: number
  record_date: string
  type: string
  during: number
  distance: number
  calorie: number
  created_at?: string
}

export interface SportsRecordForm {
  id?: number
  user_id?: number
  record_date: string
  type: string
  during: number
  distance: number
  calorie: number
}

// 通用查询参数
export interface HealthQueryParams {
  start_date?: string
  end_date?: string
  page?: number
  page_size?: number
}

// 通用响应
export interface HealthListResponse<T> {
  count: number
  next: string | null
  previous: string | null
  results: T[]
}